<template>
  <div>

    <!-- 轮播图页面 -->
    <van-swipe  class="my-swipe" :autoplay="3000" @change="onChange">
      <van-swipe-item v-for="(image, index) in images" :key="index">
      <img v-lazy="image" />
      </van-swipe-item>
    </van-swipe>
    <!-- 保险商品 -->
    <van-card
      num="2"
      tag="Hot"
      price="1.00"
      desc="篮球运动意外险 适用年龄 3 - 70 周岁..."
      title="体育保 x 我奥篮球"
      :thumb="imageURL"
       origin-price="10.00"
    >
      <div slot="footer">
        <van-button size="mini" class="van-card-btn">立即投保</van-button>
      </div>
    </van-card>
  </div>
</template>

<script>
export default {
  name: 'cmpt-insurance',
  data () {
    return {
      images: [
        require('@/images/serve/insurance/1.png'),
        require('@/images/serve/insurance/3.jpg'),
        require('@/images/serve/insurance/1.png')
      ],
      imageURL: require('@/images/serve/insurance/2.png')
    }
  },
  methods: {
    onChange (index) {
      // this.$toast('当前 Swipe 索引：' + index)
    }
  }
}
</script>

<style scoped>
.my-swipe .van-swipe-item {
  width: 100%;
  height: 40vw;
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}
 .my-swipe img{
  width: 100%;
  height: 100%;
}
.van-card-btn{
  background-color: orange;
  border-radius: 1vw;
}
</style>
